package com.dsp.sharding.order.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

@Table("t_order")
@Data
public class Order {

    @Id
    private Long id;
    private String orderSn;
    private Long userId;
    private String userName;

    public Order() {
    }

    public Order(Long id, String orderSn, Long userId, String userName) {
        this.id = id;
        this.orderSn = orderSn;
        this.userId = userId;
        this.userName = userName;
    }

    public Order(String orderSn, Long userId, String userName) {
        this.orderSn = orderSn;
        this.userId = userId;
        this.userName = userName;
    }
}
